class ModifyClient < ActiveRecord::Migration
   extend MigrationHelpers
  def self.up
    remove_column(:clients, :regitration_date)
    add_column(:clients, :registration_date, :datetime)
    add_column(:clients, :unique_id, :integer)
    
    add_index(:clients, :created_by_user_id)
    
    add_foreign_key(:clients, :created_by_user_id, :users)
  end

  def self.down
    remove_index(:clients, :created_by_user_id)
    
    remove_foreign_key(:clients, :created_by_user_id)
    
    remove_column(:clients, :unique_id)
    romove_column(:clients, :registration_date)
    add_column(:clients, :regitration_date, :datetime)
  end
end
